var _pInfo = {
	"userInfo": null,
	"param": getQueryParams(),
	"renderData": function() {
		AjaxRequest({
			url: _url + "/money/team/teamlist",
			type: "post",
			load: true,
			data: {
				"userid": _pInfo.userInfo["id"]
			},
			success: function(rs) {
				if(isReqSucceed(rs)) {
					$("#table-wrap").html(template("table-wrap-tpl", {
						rs: rs.data
					}));
				}
			}
		});
	},
	"doSearch": function() {
		var accountnumber = $("#accountnumber").val().trim();
		if(isNull(accountnumber)) {
			$.toast("请输入手机号码或者邮箱", "text");
			return;
		}
		AjaxRequest({
			url: _url + "/money/team/teamsearch",
			type: "post",
			load: true,
			data: {
				"accountnumber": accountnumber
			},
			success: function(rs) {
				if(isReqSucceed(rs)) {
					$("#table-wrap").html(template("table-wrap-tpl", {
						rs: rs.data
					}));
				}
			}
		});
	},
	"loadEvents": function() {
		_pInfo.userInfo = _user.getUserInfo();
	},
	"load": function() {
		this.loadEvents();
		this.renderData();
	}
}
exposeGlobalMethods({
	"doSearch": function() {
		_pInfo.doSearch();
	}
});
$(function() {
	_pInfo.load();
});